遇见数据集

recursal/MDN

收藏
Hugging Face2024-06-13 更新2024-06-29 收录
官方服务:

资源简介:

--- annotations_creators: - no-annotation language_creators: - crowdsourced license: - cc-by-sa-3.0 task_categories: - text-generation - fill-mask task_ids: - language-modeling - masked-language-modeling source_datasets: - original language: - en - es - fr - ja - ko - pt - ru - zho configs: - config_name: default data_files: - split: full path: "jsonl/*" pretty_name: MDN --- # Dataset Card for MDN ![](MDNWaifu.png "Mizuho (水穂) | Mizuho is a self-taught developer who rose through the ranks by leveraging the vast resources available on MDN Web Docs. She embodies the spirit of open-source and community collaboration, constantly contributing to the repository and mentoring new developers. Her mission is to make web development accessible to everyone, breaking down complex concepts into understandable and engaging lessons.") *Waifu to catch your attention.* ### Dataset Description *MDN* is a **~57M** Tokens (llama-2-7b-chat-tokenizer) / **~46.52M** Tokens (RWKV Tokenizer) scrape of [MDN (Developer.mozilla.org)](https://developer.mozilla.org/). It serves as a training resource for large language models and other NLP tasks. This card details the dataset's origin, content, and limitations. - **Curated by:** KaraKaraWitch - **Funded by:** Recursal.ai (I work there lol) - **Shared by:** KaraKaraWitch - **Language(s) (NLP):** English, Espanol, French, Japanese, Korean, Brazilian Portuguese, Russian, Chinese Simplified, Chinese Traditional - **License:** cc-by-sa-2.5 MDN was created under time constraints for the release of [EagleX v1](https://huggingface.co/recursal/EagleX_1-7T_HF), and may contain biases in selection. ### Supported Tasks and Leaderboards Primarily used for language modeling. ### Languages MDN lists the following languages: - English - Espanol - French - Japanese - Korean - Brazilian Portuguese - Russian - Chinese Simplified - Chinese Traditional ### Processing We obtained a list of pages to download with the MDN's [sitemap.xml.](https://developer.mozilla.org/sitemap.xml) This was manually downloaded. For each sitemap, we scrape the website. saving the raw html responses for further filtering and cleaning. For the actual html processing, we recommend reading the code found in the file: `MDNClean.py`. The file itself is a typer application with the following commands: ``` - sitemap - Gets a list of urls to download and downloads it to a folder. - clean - cleans a folder. saving each the cleaned text to a final jsonl. ``` We have noted an issue where there could be a false positive virus-detection on 4 of the compressed files. We have used the dataset in it's uncompressed form and didn't encounter any issues. ### Data Instances Refer to this sample to see all the relavant fields. ```json { "title": "Game development", "text": "\n\nGame development\n================\n\nGaming is one of the most popular computer activities. New technologies are constantly arriving to make\n it possible to develop better and more powerful games that can be run in any standards-compliant web\n browser.\n\nDevelop web games\n-----------------\n\nWelcome to the MDN game development center! In this area of the site, we provide resources for web<...TRUNCATED>" } ``` The format has the following keys: ```md - "title" (str) [The title of the article] - "text" (str) [The html content converted fro html into markdown.] ``` ## Recursal's Vision > To make AI accessible to everyone, regardless of language, or economical status This is the collective goal of the `RWKV Open Source foundation` and `Recursal AI`, the commercial entity who backs it. We believe that AI should not be controlled by a select few individual organization. And that it should be made accessible regardless if you are rich or poor, or a native speaker of english. ### About RWKV RWKV is an Open Source, non profit group, under the linux foundation. Focused on developing the RWKV AI architecture, in accordence to our vision. The RWKV architecture scales efficiently and economically. As an RNN & Transformer hybrid, it is able to provide the performance similar to leading transformer models, while having the compute and energy efficiency of an RNN based architecture. You can find out more about the project, and latest models, at the following - [https://blog.rwkv.com](https://blog.rwkv.com) - [https://wiki.rwkv.com](https://wiki.rwkv.com) ### About Recursal AI Recursal AI, is the commercial entity built to provide support for RWKV model development and users, while providing commercial services via its public cloud, or private-cloud / on-premise offerings. As part of our vision. Our commitment, is to ensure open source development and access to the best foundational AI models and datasets. The following dataset/models provided here, is part of that commitment. You can find out more about recursal AI here - [https://recursal.ai](https://recursal.ai) - [https://blog.recursal.ai](https://blog.recursal.ai) ### Dataset Curators KaraKaraWitch. (I typically hang out in PygmalionAI discord, sometimes EleutherAI. If something is wrong, `@karakarawitch` on discord.) I'd be happy if you could spread the word and recommend this dataset. ### Licensing Information MDN lists their license as [CC-BY-SA.](https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Attrib_copyright_license) Recursal Waifus (The banner image) are licensed under CC-BY-SA. They do not represent the related websites in any official capacity unless otherwise or announced by the website. You may use them as a banner image. However, you must always link back to the dataset. ### Citation Information ``` @misc{MDN, title = {MDN}, author = {KaraKaraWitch, recursal.ai}, year = {2024}, howpublished = {\url{https://huggingface.co/datasets/recursal/MDN}}, } ```

MDN数据集是一个从MDN Web Docs网站上抓取的文本数据集,包含约5700万到4652万个令牌,主要用于训练大型语言模型和其他自然语言处理任务。数据集支持多种语言,包括英语、西班牙语、法语、日语、韩语、巴西葡萄牙语、俄语、简体中文和繁体中文。数据集的许可证是CC-BY-SA 2.5,由KaraKaraWitch创建并由Recursal.ai资助。

提供机构:
recursal
原始信息汇总

数据集概述

基本信息

  • 数据集名称: MDN
  • 数据集大小: 约57M Tokens (llama-2-7b-chat-tokenizer) / 约46.52M Tokens (RWKV Tokenizer)
  • 语言:
    • 英语
    • 西班牙语
    • 法语
    • 日语
    • 韩语
    • 巴西葡萄牙语
    • 俄语
    • 简体中文
    • 繁体中文
  • 许可证: cc-by-sa-3.0
  • 任务类别:
    • 文本生成
    • 填充掩码
  • 任务ID:
    • 语言建模
    • 掩码语言建模
  • 源数据集: 原始数据

数据集描述

MDN是从MDN (Developer.mozilla.org)抓取的数据集,包含约57M Tokens (llama-2-7b-chat-tokenizer) / 约46.52M Tokens (RWKV Tokenizer)。该数据集主要用于训练大型语言模型和其他自然语言处理任务。

数据实例

数据集中的数据实例格式如下: json { "title": "Game development", "text": "

Game development

Gaming is one of the most popular computer activities. New technologies are constantly arriving to make it possible to develop better and more powerful games that can be run in any standards-compliant web browser.

Develop web games

Welcome to the MDN game development center! In this area of the site, we provide resources for web<...TRUNCATED>" }

数据处理

数据集的抓取和处理步骤如下:

  1. 从MDN的sitemap.xml获取页面列表并手动下载。
  2. 对每个sitemap进行网站抓取,保存原始html响应以进行进一步过滤和清理。
  3. 实际的html处理代码位于MDNClean.py文件中,该文件是一个带有以下命令的typer应用程序:
    • sitemap: 获取要下载的url列表并将其下载到文件夹中。
    • clean: 清理文件夹,将清理后的文本保存到最终的jsonl文件中。

数据集创建者

  • 创建者: KaraKaraWitch
  • 资助者: Recursal.ai

引用信息

@misc{MDN, title = {MDN}, author = {KaraKaraWitch, recursal.ai}, year = {2024}, howpublished = {url{https://huggingface.co/datasets/recursal/MDN}}, }

搜集汇总
数据集介绍
构建方式
MDN数据集源自对MDN Web Docs(Developer.mozilla.org)的全面爬取。构建过程首先通过手动下载站点的sitemap.xml文件获取待采集页面的URL列表,随后对每个站点地图中的链接进行网页抓取,并保存原始的HTML响应以供后续处理。在文本清洗阶段,研究者开发了名为MDNClean.py的Typer应用程序,该工具包含两个核心命令:sitemap命令用于获取并下载URL列表至指定文件夹,clean命令则负责清洗文件夹中的内容,将处理后的纯文本保存为最终的JSONL格式文件。整个流程在时间限制下完成,旨在为大型语言模型训练提供高质量的技术文档语料。
特点
该数据集包含约57M个令牌(基于llama-2-7b-chat分词器)或约46.52M个令牌(基于RWKV分词器),覆盖英语、西班牙语、法语、日语、韩语、巴西葡萄牙语、俄语、简体中文和繁体中文九种语言。每条数据实例包含文章标题(title)和将HTML内容转换为Markdown格式后的正文(text)两个字段,结构简洁清晰。数据集采用CC-BY-SA-3.0许可证发布,由Recursal AI资助并由KaraKaraWitch策展,主要面向语言建模任务,特别适用于文本生成和掩码语言模型等自然语言处理场景。
使用方法
用户可通过HuggingFace Datasets库直接加载该数据集,默认配置名为'default',数据文件路径为'jsonl/*',且仅包含'full'一个数据切分。加载后,每条数据以字典形式呈现,包含'title'和'text'两个键,其中'text'字段存储了经HTML转换后的Markdown格式文档内容。研究者可直接将其用于语言模型的预训练或微调,也可作为技术文档领域的知识增强数据。由于数据集已预先完成清洗和格式化,用户无需额外预处理即可投入下游任务,但需注意压缩文件中可能存在四个误报病毒检测的问题,建议使用未压缩版本以确保安全。
背景与挑战
背景概述
在自然语言处理领域,高质量、多语言的技术文档语料库对于训练大型语言模型至关重要,尤其是在代码生成、技术问答和文档理解等任务中。MDN数据集由Recursal AI的研究人员KaraKaraWitch于2024年创建,旨在系统性地爬取并整理Mozilla开发者网络(MDN Web Docs)的丰富内容,形成一个涵盖英语、西班牙语、法语、日语、韩语、葡萄牙语、俄语及中文(简体和繁体)等九种语言的约5700万词元的大规模语料库。该数据集的核心研究问题在于为多语言环境下的语言模型预训练提供权威、结构化的技术文档资源,其影响力体现在支撑了EagleX v1等模型的开发,并推动了开源社区对非英语技术内容的可及性。
当前挑战
MDN数据集所解决的领域挑战在于为语言模型提供跨语言、跨领域的技术文档训练素材,以弥补通用语料库在专业术语和结构化知识方面的不足。构建过程中面临的主要挑战包括:其一,从MDN的sitemap.xml中手动获取并解析大量URL列表,需应对网站结构的动态变化和爬取效率问题;其二,原始HTML响应需经过精细的过滤与清洗,转换为结构化的Markdown文本,过程中需处理编码差异、标签嵌套及病毒误报等异常;其三,多语言内容的平衡性和覆盖面存在偏差,因时间限制可能导致部分语言或主题的文档代表性不足,影响模型在多语言任务中的泛化能力。
常用场景
经典使用场景
MDN数据集作为从Mozilla开发者网络(MDN Web Docs)系统化采集的多语言技术文档语料库,其核心应用场景在于支撑大规模语言模型的预训练与持续学习。该数据集涵盖了英语、西班牙语、法语、日语、韩语、葡萄牙语、俄语及中文学多种语言的技术文档,特别适用于跨语言代码理解与生成、技术文档摘要、问答系统构建等自然语言处理任务。研究人员常利用其丰富的Web开发知识,对模型进行领域自适应训练,以增强模型在技术文档解析与代码注释生成等场景下的表现力。
衍生相关工作
MDN数据集衍生了一系列具有影响力的研究工作,包括基于其内容微调的多语言代码语言模型EagleX系列,该模型在代码生成与理解任务上展现了优异性能。此外,研究者利用该数据集探索了技术文档的结构化知识抽取方法,生成了用于评估语言模型技术理解能力的基准测试集。部分工作将其与Stack Overflow等社区数据融合,构建了更全面的开发者知识图谱,推动了代码-文档联合表示学习的发展,为后续的跨模态技术理解研究奠定了基础。
数据集最近研究
最新研究方向
在大型语言模型(LLM)与多语言自然语言处理领域,MDN数据集正成为推动技术民主化与开源生态建设的关键资源。该数据集汇聚了Mozilla开发者网络(MDN)涵盖英语、西班牙语、法语、日语、韩语、葡萄牙语、俄语及中简中繁等多语种的权威技术文档,为低资源语言和跨语言迁移学习提供了高质量的训练素材。前沿研究聚焦于利用MDN增强代码理解、文档生成与问答系统的能力,尤其与RWKV等高效架构的融合,旨在打破语言与算力壁垒,实现AI普惠。这一方向呼应了开源社区对透明、可复现AI的迫切需求,其意义在于通过开放知识库赋能全球开发者,推动大模型从英语中心主义向多语种、多文化包容性演进。
以上内容由遇见数据集搜集并总结生成
二维码
社区交流群
二维码
科研交流群
商业服务